package com.example.service.impl;

import com.example.mapper.BorrowMapper;
import com.example.pojo.Borrow;
import com.example.service.BorrowService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

/**
 * 名称BorrowServiceImpl
 * 描述
 *
 * @version 1.0
 * @author:wanghao
 * @datatime:2023,04,20,12,19
 */
@Service
@Primary
public class BorrowServiceImpl implements BorrowService {
    @Autowired
    BorrowMapper borrowMapper;

    @Override
    public Integer InsertBorrow(Borrow borrow){
        return borrowMapper.InsertBorrow(borrow);
    }

    @Override
    public int UpdateBookNumber(int number){return borrowMapper.UpdateBookNumber(number);}

    @Override
    public int UpdateBorrowReturn (String Return){return borrowMapper.UpdateBorrowReturn(Return);}

    @Override
    public int DeleteBorrowByID(Integer ID){return borrowMapper.DeleteBorrowByID(ID);}
}
